<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition template="/main-template.xhtml">

	<ui:define name="menu">
		<h:form>

			<rich:toolBar styleClass="toolBar">

				<rich:dropDownMenu>
					<f:facet name="label">
						<h:panelGroup>
							<h:outputText value="#{msg.label_users}" />
						</h:panelGroup>
					</f:facet>
					<rich:menuItem submitMode="ajax" value="#{msg.manageUsers}" action="users">
					<f:setPropertyActionListener value="list" target="#{userBean.currentState}"></f:setPropertyActionListener>
					</rich:menuItem>
					<rich:menuItem submitMode="ajax" value="#{msg.newUser}" action="#{userBean.prepareCreate}">
					<f:setPropertyActionListener value="create" target="#{userBean.currentState}"></f:setPropertyActionListener>
					</rich:menuItem>
				</rich:dropDownMenu>
				
				<rich:dropDownMenu>
					<f:facet name="label">
						<h:panelGroup>
							<h:outputText value="#{msg.label_process}" />
						</h:panelGroup>
					</f:facet>
					<rich:menuItem submitMode="ajax" value="#{msg.manageProcesses}" action="process">
						<f:setPropertyActionListener target="#{processBean.currentState}" value="list"/>
					</rich:menuItem>
					<rich:menuItem submitMode="ajax" value="#{msg.newProcess}" action="#{processBean.prepareCreate}">
						<f:setPropertyActionListener target="#{processBean.currentState}" value="create"/>
					</rich:menuItem>
				</rich:dropDownMenu>

			</rich:toolBar>
			
		</h:form>

	</ui:define>
	<ui:define name="content">
	
		<h:panelGroup>
		<h1><h:outputText value="#{msg.adminPanel}" /></h1>
		<div id="createForm"><rich:panel>

				<h:form id="adminPanel" style="text-align:center">
					<h:graphicImage url="/images/admin.png" /><br/>
					<h:outputText value="#{msg.greetings}, #{authBean.screenname}" style="font-size:30px; color:#0033FF; "  /><br/>
					<h:outputText value="#{msg.adminInfo}" style="font-size:30px; color:#0033FF; "  />
					
				</h:form>
			</rich:panel></div>
		</h:panelGroup>
	</ui:define>

</ui:composition>

</html>